
import java.io.BufferedReader;
import java.io.Console;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.util.StringTokenizer;
import java.util.logging.Level;
import java.util.logging.Logger;

public class Compresor {

    public static void main(String args[]) {
        Console consola = System.console();
        if (consola == null) {
            System.out.printf("No hi ha una consola associada a la JVM");
            System.exit(0); //Sortim
        }
        consola.printf("Ingressa al sistema\n");
        String user = consola.readLine("user: ");
        char password[] = consola.readPassword("pass: ");
//convertim l'array en un String
        String pass = new String(password);
        BufferedReader in = null;

        String ruta = "Usuaris.txt";
        try {
            in = new BufferedReader(new FileReader("Usuaris.txt"));
            String l;
            while ((l = in.readLine()) != null) {
                String usuarioF;
                String passwordF;
                StringTokenizer st = new StringTokenizer(l);
                System.out.println(l);
                int contador=0;
                
                while (st.hasMoreTokens()){
                    if (contador%2==0){
                        
                    }
                        st.nextToken();
                        System.out.println("omg");
                }
                
                
                
            }






        } catch (FileNotFoundException ex) {
            Logger.getLogger(Compresor.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException e) {
        }



        consola.printf("\nL'usuari es: " + user + ", i el password es: " + pass);
    }
}